home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #4
/
Commodore_Disk_User_Vol.1_4_1988_-.d64
/
inside basic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
4KB
|
153 lines
10 rem*********************************
20 rem
30 rem inside basic:
40 rem three routines to illustrate
50 rem how c64 basic works
60 rem line 20000: how basic lines are stored
70 rem line 40000: some important page zero addresses
80 rem line 60000: variable, array and string dump
90 rem*********************************
100 rem
120 rem
125 poke 53281,0
130 rem menu
140 print "[147]":print:print tab(10);"inside basic":print:print
150 print tab(6);"1. basic line addresses":print:print
160 print tab(6);"[159]2. program statistics":print:print
170 print tab(6);"[158]3. basic memory dump":print:print
180 print tab(10);"enter option no(1-3)
190 [161] i$:[139] i$[178]"" [167] 190
200 [139] i$[179]"1" [176] i$[177]"3" [167] 190
205 [153] "load":[153]
210 [145] [197](i$) [141] 20000,40000,1000
220 [153]:[153] "press any key to return to menu"
230 [161] i$:[139] i$[178]"" [167] 230
240 [156]:[137] 140
243 [143]
245 [143] test routine for s/r 60000
247 [143]
1000 [134] a$(5),b$(2,2),c$(1,1,1),i%(9),a(9)
1010 d$[178]"a string":i%[178]32000:r[178]1.9e15
1020 [129] n[178]0 [164] 9:i%(n)[178]n:a(n)[178]n:[130]
1030 [129] n[178]0 [164] 5:[135] a$(n):[130]
1040 [129] m[178]0 [164] 2:[129] n[178]0 [164] 2:[135] b$(n,m):[130]:[130]
1050 [129] q[178]0 [164] 1:[129] m[178]0 [164] 1:[129] n[178]0 [164] 1:[135] c$(n,m,q):[130]:[130]:[130]
1800 [131] this,is,a,one,dimensional,array
1810 [131] this,is,a,two,dimensional,array,"","",""
1820 [131] this,is,a,three,dimensional,array,"",""
1900 [141] 60000:[142]
19000 [143]
19010 [143] how basic lines are stored
19020 [143]
20000 address[178][194](43)[170][194](44)[172]256
20100 lineno[178][194](address[170]2)[170][194](address[170]3)[172]256
20110 [153] "line ";lineno;" starts at address ";address
20120 address[178][194](address)[170][194](address[170]1)[172]256
20130 [139] [194](address)[179][177]0 [176] [194](address[170]1)[179][177]0 [167] 20100
20140 [142]
35000 [143]
35010 [143] important addresses
35020 [143]
40000 txttab[178][194](43)[170][194](44)[172]256
40020 vartab[178][194](45)[170][194](46)[172]256
40030 arytab[178][194](47)[170][194](48)[172]256
40040 srfin[178][194](49)[170][194](50)[172]256
40050 sstart[178][194](51)[170][194](52)[172]256
40060 memsiz[178][194](55)[170][194](56)[172]256
40070 psize[178]vartab[171]txttab
40080 vsize[178]arytab[171]vartab
40090 asize[178]srfin[171]arytab
40100 sizest[178]sstart[170]1[171]srfin
40110 [153] "start of program:",txttab
40120 [153] "start of variables:",vartab
40130 [153] "start of arrays:",arytab
40140 [153] "end of strings:",sren
40150 [153] "start of strings:",sstart
40160 [153]
40170 [153] "end of basic space:",memsiz
40180 [153] "program space";psize;" bytes"
40190 [153] "variable space";vsize;" bytes"
40200 [153] "array space";asize;" bytes"
40210 [153] "string space";sizest;" bytes"
40220 [142]
59000 [143]
59100 [143] dump of variables, strings
59110 [143] and arrays
59120 [143]
60000 xb[178]0:xl[178]0:xa[178]0:xx[178]0:x1[178]0:x2[178]0:xf[178]0:xy[178]0:xz[178]0:xq[178]0:xt[178]0:x$[178]"":xd[178]0:xr[178]0
60010 x3[178]0:x4[178]0:x5[178]0
60020 xn[178][194](45)[170][194](46)[172]256:xc[178]xn[171]7
60030 xe[178][194](47)[170][194](48)[172]256:xf[178][194](49)[170][194](50)[172]256
60040 xc[178]xc[170]7:[139] ([194](xc)[175]127)[179][177]88 [167] 60040
60050 [139] ([194](xc[170]1)[175]127)[179][177]66 [167] 60040
60053 [143]
60055 [143] loop to do variables
60057 [143]
60060 x1[178][194](xn):x2[178][194](xn[170]1)
60070 [139] (x1[175]127)[178]88 [167] xn[178]xn[170]7:[137]60100
60080 [141] 60310:[153] ": ";
60090 [141] 60430:xn[178]xn[170]7
60100 [139] xn[179]xe[167] 60060
60110 [153]
60113 [143]
60115 [143] start of array loop
60117 [143]
60120 [139] xn[178][177]xf [167] 60145
60130 [153] "array:wait ";:x1[178][194](xn):x2[178][194](xn[170]1):[141] 60310:[141] 60150
60140 [153]:xn[178]xn[170]2:[137] 60120
60145 [153]:[153] "sysend of datawait":[142]
60146 [143]
60148 [143] print one array(name first)
60149 [143]
60150 [153] "(";:xx[178]0:xy[178]0:xz[178]0:xd[178][194](xn[170]4):xq[178]xn[170]5
60160 [139]xd[177]2[167]xz[178][194](xn[170]10)[170][194](xn[170]9)[172]256[171]1:xq[178]xq[170]2:[153]xz;",";
60170 [139] xd[177]1[167]xy[178][194](xn[170]8)[170][194](xn[170]7)[172]256[171]1:xq[178]xq[170]2:[153]xy;",";
60180 xx[178][194](xn[170]6)[170][194](xn[170]5)[172]256[171]1:[153] xx;
60190 [153] ")":xn[178]xq
60193 [143]
60195 [143] nested loop for elements
60197 [143]
60200 [129] x3[178]0 [164] xx:[129] x4[178]0 [164] xy:[129] x5[178]0 [164] xz
60210 [153] x$;"(";
60220 [139] xd[177]2 [167] [153] x5;",";
60230 [139] xd[177]1 [167] [153] x4;",";
60240 [153] x3;"):";
60250 [141] 60430:[139] xt[178]1 [167] xn[178]xn[170]5:[137] 60280
60260 [139] xt[178]3 [167] xn[178]xn[170]3:[137] 60280
60270 xn[178]xn[170]2
60280 [130] x5:[130] x4:[130] x3
60290 [142]
60303 [143]
60305 [143] print name
60307 [143]
60310 x$[178][199](x1[175]127)[170][199](x2[175]127)
60320 [139] x1[177]127 [167] 60350
60330 [139] x2[179]128 [167] xt[178]1:[137] 60360
60340 xt[178]3:x$[178]x$[170]"$":[137] 60360
60350 xt[178]2:x$[178]x$[170]"%":[137] 60360
60360 [153] x$;:[142]
60363 [143]
60365 [143] print string
60367 [143]
60370 xl[178][194](xn[170]2):xa[178][194](xn[170]3)[170]([194](xn[170]4))[172]256:[153] [199](34);
60380 [139] xa[178]0 [167] 60400
60390 [129] xr[178]0 [164] xl[171]1:[153] [199]([194](xa[170]xr));:[130] xr
60400 [153][199](34):[142]
60403 [143]
60405 [143] print integer
60407 [143]
60410 x1[178][194](xn[170]2):x2[178][194](xn[170]3):[153]x2[170]x1[172]256:[142]
60413 [143]
60415 [143] print real
60417 [143]
60420 [129] xr[178]2 [164] 6:[151] xc[170]xr,[194](xn[170]xr):[130] xr:[153] xb:[142]
60423 [143]
60425 [143] print content
60427 [143]
60430 [139] xt[178]2 [167] 60460
60440 [139] xt[178]1 [167] 60470
60450 [141] 60370:[137] 60480
60460 [141] 60410:[137] 60480
60470 [141] 60420
60480 [142]